Reenable modernize-use-override
Categories
(Developer Infrastructure :: Source Code Analysis, task)
Tracking
(Not tracked)
People
(Reporter: saschanaz, Assigned: saschanaz)
References
(Depends on 1 open bug)
Details
Attachments
(2 files, 14 obsolete files)
Quite some matches but most of them are generated by parser and should not be hard to fix.
By fix I mean splitting NS_IMETHOD into NS_IMETHOD_BASE (with virtual
) and NS_IMETHOD (without virtual
).
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Depends on D139166
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D139167
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D139168
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D139169
Assignee | ||
Comment 6•3 years ago
|
||
Depends on D139170
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D139171
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D139172
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D139173
Assignee | ||
Comment 10•3 years ago
|
||
Depends on D139174
Assignee | ||
Comment 11•3 years ago
|
||
Depends on D139175
Assignee | ||
Comment 12•3 years ago
|
||
Depends on D139176
Assignee | ||
Comment 13•3 years ago
|
||
Depends on D139177
Assignee | ||
Comment 14•3 years ago
|
||
Depends on D139178
Assignee | ||
Comment 15•3 years ago
•
|
||
Hi Nika, NI'ing you as this touches XPCOM.
The intention is to split virtual
keyword out of NS_IMETHOD
to make our code compatible with modernize-use-override
(which is basically "use virtual
or override
but not both").
Current:
class Foo {
NS_IMETHOD Bar();
};
class Bar: public Foo {
NS_IMETHOD Bar() override;
};
And my patches:
class Foo {
virtual NS_IMETHOD Bar();
};
class Bar: public Foo {
NS_IMETHOD Bar() override;
};
Please ping me if you have some concerns, thank you!
Assignee | ||
Comment 16•3 years ago
|
||
Depends on D139179
Comment 17•3 years ago
|
||
It feels pretty weird that we'd allow non-virtual NS_IMETHOD. Can we instead fix the lint so that it doesn't complain about keywords coming from macro expansion?
Assignee | ||
Comment 18•3 years ago
•
|
||
"Fix the lint" or maybe "add the lint" to force NS_IMETHOD be virtual? (I believe modifying a clang builtin lint is not very recommended and I don't think it's doing wrong)
Assignee | ||
Comment 19•3 years ago
•
|
||
The earlier version of my patches used #define NS_IMETHOD_BASE virtual NS_IMETHOD
, that should also work. (Or maybe not...)
Comment 20•3 years ago
|
||
(In reply to Kagami :saschanaz from comment #18)
"Fix the lint" or maybe "add the lint" to force NS_IMETHOD be virtual?
I mean, that'd be another option I guess.
(I believe modifying a clang builtin lint is not very recommended and I don't think it's doing wrong)
There's tons of clang warnings that behave differently to support macro expansion IIRC, so maybe such a thing would be acceptable upstream.
Assignee | ||
Comment 21•3 years ago
|
||
Hmm, in that case I'll at least file an issue.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 22•3 years ago
•
|
||
Okay, I now think comment #17 makes sense, actually a lot. Filed https://github.com/llvm/llvm-project/issues/53949. Feel free to add some comment if something is missing, thanks!
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Comment 23•3 years ago
|
||
(wrong link right?)
Assignee | ||
Comment 24•3 years ago
|
||
Sure, sigh. Thank you.
Comment 25•3 years ago
|
||
Comment 26•3 years ago
|
||
bugherder |
Assignee | ||
Comment 27•3 years ago
|
||
Long time no activity there. We might want to copy-paste their rule and tweak it.
Assignee | ||
Comment 28•3 years ago
|
||
Comment 29•3 years ago
|
||
Comment 30•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 31•2 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:saschanaz, maybe it's time to close this bug?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 32•1 year ago
|
||
Removing NS_IMETHOD would also allow this, but per nika we can't do that before some assembly expert adjust stdcall specific parts. Bug 662348 has a patch but I don't think I can review that.
Description
•